home *** CD-ROM | disk | FTP | other *** search
- #include <newt.h>
- #include <stdlib.h>
-
- void setColorState(void) {
- newtComponent label, f, answer;
- newtComponent yes, no;
- char *MonoEnv="NEWT_MONO";
- newtOpenWindow(21, 7, 35, 9, "Color Choices");
-
- label = newtLabel(2, 2, "Are you using a color monitor?");
-
- yes = newtButton(5, 5, "Yes");
- no = newtButton(22, 5, "No");
-
- f = newtForm(NULL, NULL, 0);
- newtFormAddComponents(f, label, yes, no, NULL);
-
- answer = newtRunForm(f);
- if (answer == f)
- answer = newtFormGetCurrent(f);
-
- newtFormDestroy(f);
- newtPopWindow();
-
- if (answer == yes)
- unsetenv(MonoEnv);
- }
-
-